package com.vieewer.btdemo.view.main.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.vieewer.btdemo.R;

public class MenuFragment extends Fragment {

    private String mTitle = "";
    private int mResId;


    @Override
    public View onCreateView(LayoutInflater inflater,
                             ViewGroup container, Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_menu, null);
        ImageView img_menu = view.findViewById(R.id.img_menu);
        if (mResId > 0) {
            img_menu.setImageResource(mResId);
        }
        TextView  txt_menu = view.findViewById(R.id.txt_menu);
        txt_menu.setText(mTitle);

        return view;
    }

    public void setViews(String title, int resId) {
        mTitle = title;
        mResId = resId;
    }




}